package com.project.mapper.goodsOrderMapper;

import com.github.pagehelper.PageInfo;
import com.project.bean.GoodsOrderBean;
import com.project.bean.GoodsOrderInfoBean;
import com.project.bean.ShopBean;
import org.apache.ibatis.annotations.Param;

import java.util.Collection;
import java.util.List;
import java.util.Map;

public interface IGoodsOrderMapper {

    /**
     * 门店的商品订单展示
     * @param storeId  门店ID
     * @return  订单集合
     */
    public List<GoodsOrderBean> findAll(int storeId);

    /**
     * 生成订单
     * @param goodsOrder  订单对象
     */
    public void add(GoodsOrderBean goodsOrder);

    /**
     * 添加订单明细
     * @param orderId 订单ID
     * @param goodsOrderInfoList 订单明细集合
     */
    public void addOrderInfo(@Param("orderId") int orderId,
                             @Param("goodsOrderInfoList") List<GoodsOrderInfoBean> goodsOrderInfoList);
    /**
     * 修改订单状态
     * @param orderId  订单ID
     * @param state 订单状态
     */
    public void update(@Param("orderId") int orderId,@Param("state") String state);
    /**
     * 按订单id查询订单,并且查询订单详情信息
     * @param orderId 订单id
     * @return 订单对象
     */
    public GoodsOrderBean findById(int orderId);


}
